unit Unit4;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, ExtCtrls, jpeg;

type
  TForm4 = class(TForm)
    Button1: TButton;
    Edit1: TEdit;
    Edit2: TEdit;
    Label1: TLabel;
    Memo1: TMemo;
    Button2: TButton;
    Label2: TLabel;
    Button3: TButton;
    Label3: TLabel;
    Image1: TImage;
    Image2: TImage;
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
    procedure Button3Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form4: TForm4;

implementation

{$R *.dfm}


procedure TForm4.Button1Click(Sender: TObject);
begin
form4.close;
end;

procedure TForm4.Button2Click(Sender: TObject);
var x,y:real;
begin
x:=strtofloat(edit1.Text);
y:=x*x;
memo1.text:=floattostr(y);
end;

procedure TForm4.Button3Click(Sender: TObject);
var x,y:real;
begin
x:=strtofloat(edit2.Text);
y:=(sqr(x))/2;
memo1.text:=floattostr(y);
end;

end.

